package com.lingyuan.warehouse.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingyuan.common.core.domain.vo.wms.WmsWareSkuVO;
import com.lingyuan.common.core.domain.warehouse.pojo.PO.WmsPurchaseDetail;
import com.lingyuan.warehouse.domain.WmsPurchase;
import com.lingyuan.warehouse.domain.WmsWareSkuPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：寇可往，我亦可往。
 * @Package：com.lingyuan.mapper
 * @Project：lingyuan-shopping-mall
 * @name：WareMapper
 * @Date：2024/9/18 10:14
 */
public interface WareMapper extends BaseMapper<WmsWareSkuPO> {
    // 根据skuName查询库存信息
    List<WmsWareSkuVO> getWareSkuList();

    // 添加库存信息
    void wareAdd(WmsWareSkuPO skuName);

    // 合并采购信息
    void mergePurchase(@Param ( "list" ) List<WmsWareSkuVO> wareSkuList);

    /**
     * 锁定
     * @param wareSkuList
     */
    boolean wareLock(@Param( "list") List<WmsWareSkuPO> wareSkuList);

    // 查询所有库存
    List<WmsWareSkuVO> fandAll();

    //添加订单
    void purchaseAdd(WmsPurchase wmsPurchase);

    //添加记录表
    void wareWmsPurchaseDetail(WmsPurchaseDetail wmsWareSkuPO);

    WmsWareSkuPO getWareName(Long skuName);

    List<WmsWareSkuVO> list();
}
